package com.swit.mobile.basket;


import	com.swit.mobile.servlet.*;

import	javax.servlet.http.*;

public class CommandSugangSave implements Command{
	private String _next;
	private String class_nm ;

	public CommandSugangSave(String next){
		_next  = next;
		class_nm = getClass().toString();
	}

	public String execute(HttpServletRequest req) throws CommandException{
		try{
			
			//Űüũ
			if(!com.swit.mobile.core.Repository.getInstance().keyCheck(req)) return "/jsp/core/keyError.jsp";
			
			String xml = Repository.getInstance().save(req);			
			req.setAttribute("xml",xml);
						
		}catch(Exception e){
			throw new CommandException(class_nm+".execute() : " + e.getMessage());
		}
		return _next;
	}
}